﻿using System;
using System.Collections;

namespace Yawf.Web.Utils {
	public interface IObjectFinder {
		/// <summary>
		/// Looks up one object of a special type, given name of property to look up for
		/// and value of that property to lookup
		/// </summary>
		/// <param name="type">Type of Object</param>
		/// <param name="lookupProperty">Property top use on lookup</param>
		/// <param name="lookupValue">Value of property to look for</param>
		/// <returns>Instance of object, false if not found</returns>
		Object LookupInstance(Type type,String lookupProperty,String lookupValue);

		/// <summary>
		/// Looks up a list of objects by property and value
		/// </summary>
		/// <param name="type">Type of objects to get</param>
		/// <param name="lookupProperty">Property to lookup objects of type T</param>
		/// <param name="lookupValues">Values to look for in property</param>
		/// <returns></returns>
		IList LookupList(Type type,String lookupProperty,String[] lookupValues);
	}
}
